package com.itheima.controller;

import com.itheima.ServerInfo.ServerInfo;
import com.itheima.entity.Result;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author xuchangshuo
 * @date 2020/8/8 15:26
 */
@RequestMapping("/monitor")
@RestController
@CrossOrigin
public class MonitorController {

    @RequestMapping("/getServerInfo")
    public Result getServerInfo() {
        ServerInfo serverInfo = new ServerInfo();
        serverInfo.copyTo();
        return new Result("success", serverInfo);
    }
}
